/* 星球漂流瓶全局样式 */

/* 引入UniApp的主题变量 */
@import '../../uni.scss';

/* 全局重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  color: #333;
  background-color: #f5f5f5;
}

/* 主题颜色 */
:root {
  --primary-color: #1890ff;
  --secondary-color: #52c41a;
  --warning-color: #faad14;
  --error-color: #f5222d;
  --info-color: #1890ff;
  --text-color: #333;
  --text-secondary: #666;
  --text-placeholder: #999;
  --border-color: #e8e8e8;
  --background-color: #f5f5f5;
  --white: #fff;
  --black: #000;
  --star-color: #ffd700;
  --planet-blue: #45B7D1;
  --planet-red: #FF6B6B;
  --planet-yellow: #F7DC6F;
  --planet-green: #4ECDC4;
  --planet-purple: #BB8FCE;
}

/* 星球背景样式 */
.planet-bg {
  background: linear-gradient(135deg, #000033 0%, #000066 50%, #000099 100%);
  background-attachment: fixed;
  position: relative;
  overflow: visible;
}

/* 星空效果 */
.stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.star {
  position: absolute;
  background-color: var(--star-color);
  border-radius: 50%;
  animation: twinkle var(--duration, 2s) infinite alternate;
}

@keyframes twinkle {
  0% {
    opacity: 0.3;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* 星球卡片样式 */
.planet-card {
  background-color: var(--white);
  border-radius: 12rpx;
  padding: 30rpx;
  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.planet-card:active {
  transform: scale(0.98);
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
}

.planet-card:hover {
  box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.15);
}

/* 漂流瓶样式 */
.bottle {
  width: 200rpx;
  height: 280rpx;
  position: relative;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20rpx) rotate(5deg);
  }
}

.bottle-body {
  width: 200rpx;
  height: 240rpx;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 0 0 100rpx 100rpx;
  position: relative;
  overflow: hidden;
}

.bottle-neck {
  width: 60rpx;
  height: 40rpx;
  background-color: rgba(255, 255, 255, 0.8);
  position: absolute;
  top: -40rpx;
  left: 50%;
  transform: translateX(-50%);
}

.bottle-cap {
  width: 80rpx;
  height: 20rpx;
  background-color: #8B4513;
  position: absolute;
  top: -60rpx;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 10rpx;
}

/* 文本样式 */
.text-primary {
  color: var(--primary-color);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-placeholder {
  color: var(--text-placeholder);
}

.text-success {
  color: var(--secondary-color);
}

.text-warning {
  color: var(--warning-color);
}

.text-error {
  color: var(--error-color);
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

/* 按钮样式 */
.btn {
  padding: 24rpx 48rpx;
  border-radius: 8rpx;
  font-size: 28rpx;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120rpx;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-primary:active {
  background-color: #40a9ff;
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--white);
}

.btn-secondary:active {
  background-color: #73d13d;
}

.btn-warning {
  background-color: var(--warning-color);
  color: var(--white);
}

.btn-warning:active {
  background-color: #ffc53d;
}

.btn-error {
  background-color: var(--error-color);
  color: var(--white);
}

.btn-error:active {
  background-color: #ff4d4f;
}

.btn-outline {
  background-color: transparent;
  border: 2rpx solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:active {
  background-color: rgba(24, 144, 255, 0.1);
}

.btn-disabled {
  background-color: #f5f5f5;
  color: var(--text-placeholder);
  cursor: not-allowed;
}

/* 输入框样式 */
.input {
  width: 100%;
  padding: 24rpx;
  border: 2rpx solid var(--border-color);
  border-radius: 8rpx;
  font-size: 28rpx;
  transition: border-color 0.3s ease;
  background-color: var(--white);
}

.input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.input::placeholder {
  color: var(--text-placeholder);
}

.input-disabled {
  background-color: #f5f5f5;
  color: var(--text-placeholder);
  cursor: not-allowed;
}

/* 表单样式 */
.form-item {
  margin-bottom: 30rpx;
}

.form-label {
  display: block;
  margin-bottom: 12rpx;
  font-size: 28rpx;
  font-weight: 500;
  color: var(--text-color);
}

.form-error {
  color: var(--error-color);
  font-size: 24rpx;
  margin-top: 8rpx;
}

/* 卡片样式 */
.card {
  background-color: var(--white);
  border-radius: 12rpx;
  padding: 30rpx;
  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
  margin-bottom: 30rpx;
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 32rpx;
  height: 32rpx;
  border: 3rpx solid rgba(24, 144, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 0.8s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 空状态样式 */
.empty-state {
  padding: 80rpx 40rpx;
  text-align: center;
}

.empty-state-icon {
  width: 160rpx;
  height: 160rpx;
  margin: 0 auto 30rpx;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 28rpx;
  color: var(--text-placeholder);
}

/* 分页样式 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30rpx 0;
}

.pagination-item {
  width: 60rpx;
  height: 60rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 10rpx;
  border-radius: 6rpx;
  font-size: 28rpx;
}

.pagination-item.active {
  background-color: var(--primary-color);
  color: var(--white);
}

.pagination-item.disabled {
  color: var(--text-placeholder);
}

/* 滑动操作样式 */
.slide-action {
  position: relative;
  overflow: hidden;
}

.slide-action-content {
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.slide-action-buttons {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 0;
  display: flex;
  height: 100%;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8rpx;
  height: 8rpx;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4rpx;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4rpx;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 20rpx;
  }
  
  .card {
    padding: 20rpx;
    margin-bottom: 20rpx;
  }
}

/* 动画效果 */
.fade-enter-active, .fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from, .fade-leave-to {
  opacity: 0;
}

.slide-up-enter-active, .slide-up-leave-active {
  transition: transform 0.3s ease;
}

.slide-up-enter-from, .slide-up-leave-to {
  transform: translateY(100%);
}

.slide-down-enter-active, .slide-down-leave-active {
  transition: transform 0.3s ease;
}

.slide-down-enter-from, .slide-down-leave-to {
  transform: translateY(-100%);
}

/* 浮动气泡效果 */
.bubble {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  animation: float-up 4s ease-in-out infinite;
}

@keyframes float-up {
  0% {
    transform: translateY(0) scale(0.5);
    opacity: 0;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-1000rpx) scale(1.5);
    opacity: 0;
  }
}

/* 星球旋转动画 */
.planet-rotate {
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}